package cn.gzpc.aistaff.api.ai.module.boss.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.ai.openai.OpenAiChatModel;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/ai-staff")
public class TestController {

    private final OpenAiChatModel openAiChatModel;

    @GetMapping("/test")
    public String test(){
        String called = openAiChatModel.call("肯德基的优惠");
        System.out.println(called);
        return called;
    }
}
